package com.sun.web.framework;

import com.sun.web.domain.User;

public class TokenHolder {
	private static ThreadLocal<User> threadLocal = new ThreadLocal<User>();
	
	public static void setUser(User user){
		threadLocal.set(user);
	}
	
	public static User getUser(){
		return threadLocal.get();
	}
	
	public static void clear(){
		threadLocal.remove();
	}
}
